package com.weai.portal.repository;

import com.weai.portal.entity.Solution;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface SolutionRepository extends JpaRepository<Solution, Integer> {
    
    @Query("SELECT s FROM Solution s WHERE s.solutionName LIKE %:keyword% OR s.description LIKE %:keyword% OR s.userGroup LIKE %:keyword%")
    List<Solution> searchByKeyword(@Param("keyword") String keyword);
} 